package com.nine.controller;

import cn.hutool.core.util.IdUtil;
import com.nine.anno.RedisLimitAnno;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class RedisLimitController {

    @RedisLimitAnno(key = "redis_test", permitPerSecond = 3, expire = 30, msg = "稍后再试！")
    @GetMapping("/redis/limit/test")
    public String redisLimit() {
            return "业务运行返回，流水号：" + IdUtil.fastUUID();
    }

}
